<html>
<head><meta charset="utf-8"><title>APIs for getting stuff from a Vec by owned · t-libs · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/index.html">t-libs</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/APIs.20for.20getting.20stuff.20from.20a.20Vec.20by.20owned.html">APIs for getting stuff from a Vec by owned</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="209048053"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/APIs%20for%20getting%20stuff%20from%20a%20Vec%20by%20owned/near/209048053" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/APIs.20for.20getting.20stuff.20from.20a.20Vec.20by.20owned.html#209048053">(Sep 04 2020 at 01:47)</a>:</h4>
<p>(Forking from the <a href="#narrow/stream/219381-t-libs/topic/Eager.20skipping.20for.20iterators/near/209045693">skipping thread</a>, cc <span class="user-mention" data-user-id="232545">@Joshua Nelson</span>)</p>
<p>Maybe with <code>min_const_generics</code> coming soon there are some new <code>TryInto</code>s that could make sense for <code>Vec</code> that could cover this?</p>
<p>Without having worked out the details, this seems neat:</p>
<div class="codehilite"><pre><span></span><code><span class="kd">let</span><span class="w"> </span><span class="p">[</span><span class="n">a</span><span class="p">,</span><span class="w"> </span><span class="n">b</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">vec</span><span class="p">.</span><span class="n">try_into</span><span class="p">().</span><span class="n">unwrap</span><span class="p">();</span><span class="w"></span>
</code></pre></div>



<a name="209048103"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/APIs%20for%20getting%20stuff%20from%20a%20Vec%20by%20owned/near/209048103" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/APIs.20for.20getting.20stuff.20from.20a.20Vec.20by.20owned.html#209048103">(Sep 04 2020 at 01:48)</a>:</h4>
<p>ooh that seems <em>really</em> nice</p>



<a name="209048111"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/APIs%20for%20getting%20stuff%20from%20a%20Vec%20by%20owned/near/209048111" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/APIs.20for.20getting.20stuff.20from.20a.20Vec.20by.20owned.html#209048111">(Sep 04 2020 at 01:48)</a>:</h4>
<p>it seems like that should only work if the vec is the same length though?</p>



<a name="209048123"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/APIs%20for%20getting%20stuff%20from%20a%20Vec%20by%20owned/near/209048123" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/APIs.20for.20getting.20stuff.20from.20a.20Vec.20by.20owned.html#209048123">(Sep 04 2020 at 01:49)</a>:</h4>
<p>Yeah, I think the ones from slices to arrays require exact matches</p>



<a name="209048133"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/APIs%20for%20getting%20stuff%20from%20a%20Vec%20by%20owned/near/209048133" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/APIs.20for.20getting.20stuff.20from.20a.20Vec.20by.20owned.html#209048133">(Sep 04 2020 at 01:49)</a>:</h4>
<p>this might work though:</p>
<div class="codehilite"><pre><span></span><code><span class="kd">let</span><span class="w"> </span><span class="p">[</span><span class="n">a</span><span class="p">,</span><span class="w"> </span><span class="o">..</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">vec</span><span class="p">.</span><span class="n">try_into</span><span class="p">().</span><span class="n">unwrap</span><span class="p">();</span><span class="w"></span>
</code></pre></div>



<a name="209048137"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/APIs%20for%20getting%20stuff%20from%20a%20Vec%20by%20owned/near/209048137" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/APIs.20for.20getting.20stuff.20from.20a.20Vec.20by.20owned.html#209048137">(Sep 04 2020 at 01:49)</a>:</h4>
<p>not sure what the types look like for that lol</p>



<a name="209048170"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/APIs%20for%20getting%20stuff%20from%20a%20Vec%20by%20owned/near/209048170" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/APIs.20for.20getting.20stuff.20from.20a.20Vec.20by.20owned.html#209048170">(Sep 04 2020 at 01:50)</a>:</h4>
<p>I think that wouldn't be able to infer a type, yeah.</p>



<a name="209048189"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/APIs%20for%20getting%20stuff%20from%20a%20Vec%20by%20owned/near/209048189" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/APIs.20for.20getting.20stuff.20from.20a.20Vec.20by.20owned.html#209048189">(Sep 04 2020 at 01:50)</a>:</h4>
<p>that seems prone to putting your whole vector onto stack</p>



<a name="209048229"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/APIs%20for%20getting%20stuff%20from%20a%20Vec%20by%20owned/near/209048229" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/APIs.20for.20getting.20stuff.20from.20a.20Vec.20by.20owned.html#209048229">(Sep 04 2020 at 01:51)</a>:</h4>
<p><code>truncate</code>-then-<code>try_into</code> doesn't seems insane, given than <code>[..n].try_into()</code> is how you do it with slices.</p>
<p>(Another version that's essentially the <code>IntoIterator</code> one: <code>VecDeque::from(vec).pop_front()</code>)</p>
<p>I suppose we could add <code>into_prefix&lt;N&gt;(self)-&gt;Result&lt;[T;N], Self&gt;</code> and such, but I don't know that's worth it vs just using the truncate.</p>
<p>Hmm, <code>pop_chunk&lt;N&gt;(&amp;mut self) -&gt; Option&lt;[T; N]&gt;</code> is interesting, and also a feasible thing to combine with <code>truncate</code> to get pieces by ownership.  And the <code>pop</code> version seems more generally useful than the one that turns a whole Vec into an array, since if you only need a small enough number to fit in an array then it's a bit odd to be using a vec in the first place...</p>



<a name="209051224"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/APIs%20for%20getting%20stuff%20from%20a%20Vec%20by%20owned/near/209051224" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/APIs.20for.20getting.20stuff.20from.20a.20Vec.20by.20owned.html#209051224">(Sep 04 2020 at 03:13)</a>:</h4>
<p>Well, it turns out that <code>Box&lt;[T; N]&gt;: TryFrom&lt;Box&lt;[T]&gt;&gt;</code> already existed (as well as versions for <code>Rc</code> and <code>Arc</code>) so I made a PR for the <code>[T; N]: TryFrom&lt;Vec&lt;T&gt;&gt;</code> mentioned: <a href="https://github.com/rust-lang/rust/pull/76310">https://github.com/rust-lang/rust/pull/76310</a></p>



<a name="209110844"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/APIs%20for%20getting%20stuff%20from%20a%20Vec%20by%20owned/near/209110844" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/APIs.20for.20getting.20stuff.20from.20a.20Vec.20by.20owned.html#209110844">(Sep 04 2020 at 15:56)</a>:</h4>
<p>hmm, i feel like pop_chunk/into_prefix are both special cases of an <code>into_chunk&lt;const N: usize&gt;(self, offset: usize)</code> but it's kinda weird/not great ergonomics</p>



<a name="209110922"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/APIs%20for%20getting%20stuff%20from%20a%20Vec%20by%20owned/near/209110922" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/APIs.20for.20getting.20stuff.20from.20a.20Vec.20by.20owned.html#209110922">(Sep 04 2020 at 15:56)</a>:</h4>
<p>like, you'd want it to be a range but obviously that can't work as the size of the range needs to be known at compile time</p>



<a name="209111027"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/APIs%20for%20getting%20stuff%20from%20a%20Vec%20by%20owned/near/209111027" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/APIs.20for.20getting.20stuff.20from.20a.20Vec.20by.20owned.html#209111027">(Sep 04 2020 at 15:57)</a>:</h4>
<p>i've definitely wanted this, but just did a try_into for the array and cloned the elements</p>



<a name="209111111"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/APIs%20for%20getting%20stuff%20from%20a%20Vec%20by%20owned/near/209111111" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/APIs.20for.20getting.20stuff.20from.20a.20Vec.20by.20owned.html#209111111">(Sep 04 2020 at 15:58)</a>:</h4>
<p>actually no, sorry, the case i needed this was for an array to begin with, so not quite the same</p>



<a name="209120221"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/APIs%20for%20getting%20stuff%20from%20a%20Vec%20by%20owned/near/209120221" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/APIs.20for.20getting.20stuff.20from.20a.20Vec.20by.20owned.html#209120221">(Sep 04 2020 at 17:26)</a>:</h4>
<p>And you could have a <code>fn drain_chunks(&amp;mut self, ...) -&gt; impl Iterator&lt;[T; N]&gt;</code></p>



<a name="209120895"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/APIs%20for%20getting%20stuff%20from%20a%20Vec%20by%20owned/near/209120895" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/APIs.20for.20getting.20stuff.20from.20a.20Vec.20by.20owned.html#209120895">(Sep 04 2020 at 17:33)</a>:</h4>
<p>The "ultimate" solution is <code>fn pick(self, idx: [usize; N]) -&gt; [T; N]</code>. Then sprinkle some <code>ptr::read</code> and <code>ptr::write</code>, and <code>MaybeUninit</code>.</p>



<a name="209121343"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/APIs%20for%20getting%20stuff%20from%20a%20Vec%20by%20owned/near/209121343" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/APIs.20for.20getting.20stuff.20from.20a.20Vec.20by.20owned.html#209121343">(Sep 04 2020 at 17:37)</a>:</h4>
<p>I'm sure there's a nice data structure to ensure that <code>idx</code> contains unique values, but <a href="https://stackoverflow.com/a/53146512/155423">I was lazy and used a <code>BTreeSet</code> for something similar</a></p>



<a name="209138012"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/APIs%20for%20getting%20stuff%20from%20a%20Vec%20by%20owned/near/209138012" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/APIs.20for.20getting.20stuff.20from.20a.20Vec.20by.20owned.html#209138012">(Sep 04 2020 at 20:33)</a>:</h4>
<p><span class="user-mention" data-user-id="209168">@Thom Chiovoloni</span> For <code>into_prefix</code> I agree, though I figured <code>pop_chunk</code> would be <code>&amp;mut self</code> -- kinda like the inverse of <code>.extend([1, 2, 3].into_iter_for_real())</code>.</p>
<p><span class="user-mention" data-user-id="116155">@Jake Goulding</span> I've definitely wanted the <code>-&gt; [&amp;mut T; N]</code> version of that before. (I usually called it <code>multi_index</code>.)  Yet another think that min_const_generics makes a plausible <code>core</code> addition <span aria-label="tada" class="emoji emoji-1f389" role="img" title="tada">:tada:</span>  (Now if only it could be <code>slice[[1, 2, 3]]</code> for easy typing...)</p>



<a name="209138121"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/APIs%20for%20getting%20stuff%20from%20a%20Vec%20by%20owned/near/209138121" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/APIs.20for.20getting.20stuff.20from.20a.20Vec.20by.20owned.html#209138121">(Sep 04 2020 at 20:34)</a>:</h4>
<p>Can it not be? Just rub some traits on it.</p>



<a name="209138189"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/APIs%20for%20getting%20stuff%20from%20a%20Vec%20by%20owned/near/209138189" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/APIs.20for.20getting.20stuff.20from.20a.20Vec.20by.20owned.html#209138189">(Sep 04 2020 at 20:35)</a>:</h4>
<p>We're stuck returning a ref from <code>IndexMut</code>, so I don't think it's possible, no.</p>



<a name="209151724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/APIs%20for%20getting%20stuff%20from%20a%20Vec%20by%20owned/near/209151724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/APIs.20for.20getting.20stuff.20from.20a.20Vec.20by.20owned.html#209151724">(Sep 05 2020 at 00:08)</a>:</h4>
<p>Oh, that issue, certainly.</p>



<a name="225498545"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/APIs%20for%20getting%20stuff%20from%20a%20Vec%20by%20owned/near/225498545" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/APIs.20for.20getting.20stuff.20from.20a.20Vec.20by.20owned.html#225498545">(Feb 08 2021 at 02:51)</a>:</h4>
<p>It would be really nice if something like this worked:</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">if</span><span class="w"> </span><span class="kd">let</span><span class="w"> </span><span class="p">[</span><span class="n">x</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="fm">vec!</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="fm">println!</span><span class="p">(</span><span class="s">"{}"</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="p">);</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="225501555"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/APIs%20for%20getting%20stuff%20from%20a%20Vec%20by%20owned/near/225501555" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/APIs.20for.20getting.20stuff.20from.20a.20Vec.20by.20owned.html#225501555">(Feb 08 2021 at 03:58)</a>:</h4>
<p>Few different things related to that:</p>
<ul>
<li><a href="https://github.com/rust-lang/rust/issues/76342">https://github.com/rust-lang/rust/issues/76342</a>, Irrefutable slice patterns should be inferred as arrays of that length</li>
<li><a href="https://github.com/rust-lang/lang-team/pull/78">https://github.com/rust-lang/lang-team/pull/78</a>, about possibly having deref patterns</li>
<li><code>if let Ok([x]) = &lt;[i32;1]&gt;::try_from(vec![1]) {</code> <a href="https://play.rust-lang.org/?version=nightly&amp;mode=debug&amp;edition=2018&amp;gist=2f73e257c9d534f3a019a04a4dff55f9">works</a> today (but really makes one want that inference bug fixed)</li>
</ul>



<a name="225509032"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/APIs%20for%20getting%20stuff%20from%20a%20Vec%20by%20owned/near/225509032" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/APIs.20for.20getting.20stuff.20from.20a.20Vec.20by.20owned.html#225509032">(Feb 08 2021 at 07:05)</a>:</h4>
<p>You can move if you convert to a <code>Box&lt;[T]&gt;</code> first:</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="w">    </span><span class="k">if</span><span class="w"> </span><span class="kd">let</span><span class="w"> </span><span class="p">[</span><span class="n">x</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">*</span><span class="fm">vec!</span><span class="p">[</span><span class="mi">1</span><span class="p">].</span><span class="n">into_boxed_slice</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="fm">println!</span><span class="p">(</span><span class="s">"{}"</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="p">);</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="225509205"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/APIs%20for%20getting%20stuff%20from%20a%20Vec%20by%20owned/near/225509205" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/APIs.20for.20getting.20stuff.20from.20a.20Vec.20by.20owned.html#225509205">(Feb 08 2021 at 07:08)</a>:</h4>
<p>hmm, actually no, that only works because the integer is copied.</p>



<a name="225509226"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/APIs%20for%20getting%20stuff%20from%20a%20Vec%20by%20owned/near/225509226" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/APIs.20for.20getting.20stuff.20from.20a.20Vec.20by.20owned.html#225509226">(Feb 08 2021 at 07:09)</a>:</h4>
<p>but I think that would be true of arrays too -- it cites <a href="https://doc.rust-lang.org/stable/error-index.html#E0508">E0508</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>